package edu.byu.intex2.data.bo;

import edu.byu.intex2.data.DataException;
import edu.byu.intex2.data.dao.NewCarDAO;

/**
 * @author Jason Whiting
 */
public class NewCar extends PhysicalCar
{

    private double MSRP;

    /**
     * Creates a new instance of BusinessObject
     * @param id
     */
    public NewCar(String id)
    {
        super(id);
    }//constructor

    //Quick Access Method
    @Override
    public void save() throws DataException
    {
        try
        {
            NewCarDAO.getInstance().save(this);
        } catch (DataException e)
        {
            e.printStackTrace();
        }
    }

    /** 
     * @return the MSRP
     */
    public double getMSRP()
    {
        return MSRP;
    }

    /** 
     * @param MSRP the MSRP to set
     */
    public void setMSRP(double MSRP)
    {
        this.MSRP = MSRP;
        setDirty();
    }
}
